import React from 'react';
import { changePage } from '../../store/actions'
import { connect } from 'react-redux'
import FormEditUser from '../../components/formEditUser'
class UserAdd extends React.Component{
    constructor(props){
        super(props);
    }
    componentWillMount(){

        this.props.dispatch(changePage('user-add'));
    }
    render(){
        return (
            <FormEditUser dispatch={this.props.dispatch} />
        )
    }
}
export default UserAdd = connect((state)=>{
    const {user} = state.rootReducer;
    return {user}
})(UserAdd)